package com.hxzy.controller.mobile.product;

import com.hxzy.common.vo.resp.R;
import com.hxzy.controller.mobile.product.req.MobileProductReq;
import com.hxzy.controller.mobile.product.resp.MobileProductResp;
import com.hxzy.service.ProductService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.List;

/**
 * @Author wy
 * @Description TODO
 * @Date 2023/7/20 15:21
 * @Version 1.0
 */
@Api(tags = "手机端-商品信息")
@RestController
@RequestMapping(value = "/mobile/product")
public class MobileProductController {

    @Autowired
    private ProductService productService;


    @ApiOperation(value = "查询")
    @GetMapping(value = "/list")
    public R<List<MobileProductResp>> search(@Valid MobileProductReq req){
         List<MobileProductResp> list=this.productService.mobileSearch(req);
         return R.okHasData(list);
    }

}
